import { AudioClip, JsonAsset, Prefab, SpriteFrame, Vec3 } from "cc";

/**
 * 游戏全局数据
 */
export class GlobalData {

    //横向数量
    static HorNum: number = 9;
    //纵向数量
    static VerNum: number = 6;

    //砖块间距
    static BrickSpace: number = 75;

    //砖块交换位置动画时间
    static BrickMoveTime: number = 0.15;

    //砖块下降的速度
    static BrickDownSpeed: number = 0.3;

    //当前得砖块种类数量
    static BrickTypeNum: number = 0;

    //移动路径
    static MovePath = [
        { star: { x: -500, y: 240 }, end: { x: 300, y: 240 } },
        { star: { x: 300, y: 240 }, end: { x: 300, y: 100 } },
        { star: { x: 300, y: 100 }, end: { x: -300, y: 100 } },
        { star: { x: -300, y: 100 }, end: { x: -300, y: -40 } },
        { star: { x: -300, y: -40 }, end: { x: 300, y: -40 } },
        { star: { x: 300, y: -40 }, end: { x: 300, y: -180 } },
        { star: { x: 300, y: -180 }, end: { x: 0, y: -180 } },
    ]

    //移动速度
    static MoveSpeed: number = 2;

    /**
     * 移动间距
     */
    static MoveSpace: number[] = [];

    //游戏结束
    static GameOver: boolean = false;

    //游戏速度
    static GameSpeed: number = 5;

}

/**
 * 资源列表
 */
export const GAME_RES = {
    BundleName: "GAME_RES",//资源包名称
    Asset: {//资源列表
        Prefabs: { path: "Prefab", type: Prefab },
        Sounds: { path: "Sound", type: AudioClip },
        SpriteFrames: { path: "SpriteFrame", type: SpriteFrame },
        Jsons: { path: "Json", type: JsonAsset }
    }
}

/**
 * 游戏预设体
 */
export const GAME_PREFAB = {
    PopSingleBallSkin: 'PopSingleBallSkin'
}

/**
 * 游戏场景
 */
export const GAME_SCENE = {
    LoginScene: "LoginScene",
    GameScene: "GameScene"
}

/**
 * 方向
 */
export const DIRECTION = {
    UP: "Up",
    DOWN: "Down",
    LEFT: "Left",
    RIGHT: "Right"
}

/**
 * 游戏弹窗
 */
export const GAME_POP = {
    PopSet: "PopSet",
    PopSkin: "PopSkin"
}

/**
 * 游戏顶层弹窗
 */
export const GAME_TOP = {
    NOTOUCH: "NoTouch"
}

/**
 * 音效分类
 */
export const SOUND_TYPE = {
    Button: "Button",
}






